@extends('layout.admin')

@section('content')
	
	<div class="clearfix"></div>
  
	<div class="col-md-10 " >
  @if (count($errors) > 0)
      <div class="alert alert-info">
              @foreach ($errors->all() as $error)
              <li>
                <img src="/admins/images/info.png" alt="">&nbsp;
                {{ $error }}</li>
              @endforeach
      </div>
  @endif
 

 <div class="panel-head"><strong class="icon-reorder"> 修改用户信息</strong></div>
  <form class="form-horizontal" role="form" action='/admin/user/updata' method='post' enctype='multipart/form-data' style='margin-left:0px'> 
        <div class="form-group" style='margin-bottom:20px'>
          <label for="inputEmail3" class="col-sm-2 control-label">用&nbsp;户&nbsp;名</label>
          <div class="col-sm-10">
              <input type="text" name='username' class="form-control" id="inputEmail3" placeholder="昵称" value='{{$user->username}}'>
          </div>
        </div>
        <div class="form-group" style='margin-bottom:20px'>
          <label for="email" class="col-sm-2 control-label">邮&nbsp;&nbsp;  &nbsp;&nbsp; 箱</label>
          <div class="col-sm-10">
              <input type="email" name='email' class="form-control" id="email" placeholder="邮箱" value='{{$user->email}}'>
          </div>
        </div>
        <div class="form-group" style='margin-bottom:20px'>
          <label for="exampleInputFile"  class="col-sm-2 control-label">头&nbsp;&nbsp;  &nbsp;&nbsp; 象</label>
              <div  heiht='300px' width='500px'>
	              <img src="{{$user->profile}}" height='150px' alt="" style="float:left;">
	              <input type="file" name='profile' style="float:left;" id="exampleInputFile">
	              <!-- <img src="/" alt=""> -->
              </div>
        </div>
        <div class="form-group" style='margin-bottom:20px'>
          <label for="inputPassword3" class="col-sm-2 control-label">性&nbsp;&nbsp;  &nbsp;&nbsp; 别</label>
          <div style='margin-top:8px '>
              <label for="nan"><input type="radio" name='sex' id='nan' value='1' @if($user->sex==1) checked @endif>男</label> &nbsp;&nbsp; 
              <label for="nv"><input type="radio" name='sex' id='nv' value='0' @if($user->sex==0) checked @endif>女</label>
          </div>
      </div>
        <div class="mws-button-row" style='margin-left:300px '>
            {{csrf_field()}}
            <input type="hidden" name='id' value='{{$user->id}}'>
            <input value="修改" class="btn btn-danger" type="submit" style='margin-right:30px'>
            <input value="重置" class="btn " type="reset">
        </div>
    </form>
</div>
		
	</div>


@endsection